Yes. One program can be the source of the stream and the other program can be the destination.
A stream that connects two executing programs is called a pipe. To one program the pipe is an output stream; to the other program it is an input stream.
There are many types of IO devices. Some can be a source; others can be a destination; and others can be both source and destination. Often an object functions as the destination for one stream and as the source for another. In the table, decide what role each object can play.
Some objects switch roles depending on what program is running. For example a disk file might be the destination for the output of one program, and later it may be the source for another program.